/**
 * Copyright(C) 2019 FUYUN DATA SERVICES CO., LTD. - All Rights Reserved
 * Unauthorized copying of this file, via any medium is strictly prohibited
 * Proprietary and confidential
 * 该源代码版权归属福韵数据服务有限公司所有
 * 未经授权，任何人不得复制、泄露、转载、使用，否则将视为侵权
 */

import request from "../../../../utils/request";
import { stringify } from "querystring";
import { SERVER_URL } from "../../../../config/base";

// 查询产品列表数据
export async function getSearchLogList(payload: any) {
  return request(`${SERVER_URL}/pseudo?${stringify(payload)}`, {
    method: "get",
    data: {}
  });
}

export async function delPseudo(payload: any) {
  return request(
    `${SERVER_URL}/pseudo/` + payload.goodsName + `/` + payload.goodsBatch,
    {
      method: "delete",
      data: {}
    }
  );
}

export async function getBatchAndName(payload: any) {
  return request(
    `${SERVER_URL}/pseudo/findBatchAndName?${stringify(payload)}`,
    {
      method: "get",
      data: {}
    }
  );
}

export async function deleteById(id: string) {
  return request(`${SERVER_URL}/pseudo/` + id, {
    method: "delete",
    data: {}
  });
}
